<template>
	<view>
		<view class="maintenanceHome">
			<view v-if="roleStatus == 2" class="maintenanceHome-top ff-bg-f5" :style="tabberStyle">
				<view class="maintenanceHome-top-header">
					<image class="topHeader"
						src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/fire-technology/company-home-bg.png"
						mode="">
					</image>
					<view
						class="maintenanceHome-top-header-content ff-flex-around ff-align-items-one ff-text-center ff-color-fff">
						<view @click="goResponseRecord">
							<u-count-to :start-val="0" :end-val="orgProjectNumList.respNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">响应记录</view>
						</view>
						<view>
							<u-count-to :start-val="0" :end-val="orgProjectNumList.bidNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">项目</view>
						</view>
						<view>
							<u-count-to :start-val="0" :end-val="orgProjectNumList.waitingNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">待检测</view>
						</view>
						<view>
							<u-count-to :start-val="0" :end-val="orgProjectNumList.testingNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">检测中</view>
						</view>
					</view>
				</view>
				<view
					class="maintenanceHome-top-tipsBox ff-align-items-one ff-color-fff ff-flex-between ff-bg-fff ff-border-radius-15 ff-margin-left-15 ff-margin-right-15">
					<view @click="personnelManagementClick"
						class="maintenanceHome-top-tipsBox-left ff-font-17 ff-align-items ff-border-radius-10">
						<view>
							人员管理
							<u-badge type="error" v-if="companyProjectNumList.waitValidStaffNum > 0"
								:count="companyProjectNumList.waitValidStaffNum"></u-badge>
						</view>
						<image class="ff-margin-left-18"
							src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/fire-technology/company-go.png"
							mode="">
						</image>
						<image class="tipsImg"
							src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/fire-technology/company-personel.png"
							mode=""></image>
					</view>
					<view v-if="false" @click="releaseRequirementsClick"
						class="maintenanceHome-top-tipsBox-right ff-bg-device ff-font-17 ff-align-items ff-border-radius-10">
						<view>设备管理</view>
						<image class="ff-margin-left-18"
							src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/fire-technology/company-go.png"
							mode="">
						</image>
						<image class="tipsImg"
							src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/fire-technology/maintenance-device.png"
							mode=""></image>
					</view>
				</view>
				<view
					class="maintenanceHome-top-notice ff-margin-top-10 ff-margin-left-15 ff-margin-right-15 ff-border-radius-20 ff-bg-f5">
					<f-notice />
				</view>
				<view
					class="ff-overflow-hidden ff-border-radius-5 ff-margin-top-10 ff-margin-left-15 ff-margin-right-15 ff-bg-f5">
					<u-tabs bg-color="#f5f5f5" :list="adminTypeList" :show-zero="true" :current="typeCurrent"
						active-color="#3178FF" @change="tabberChange"></u-tabs>
					<view
						class="ff-bg-f5 ff-padding-left-15 ff-padding-right-15 ff-padding-top-12 ff-padding-bottom-12">
						<u-search v-model="params.keyword" input-align="center" @change="projectNameChange"
							bg-color="#FFFFFF" :height="72" :show-action="false" :clearabled="true"
							placeholder="请输入要搜索的项目名称"></u-search>
					</view>
				</view>
			</view>
			<view v-if="roleStatus == 3" class="maintenanceHome-top ff-bg-f5" :style="tabberStyle">
				<view class="maintenanceHome-top-header header-staff">
					<image class="topHeader"
						src="https://fire-system.oss-cn-beijing.aliyuncs.com/web/fire-technology/company-home-bg.png"
						mode="">
					</image>
					<view
						class="maintenanceHome-top-header-content ff-flex-around ff-align-items-one ff-text-center ff-color-fff">
						<view>
							<u-count-to :start-val="0" :end-val="orgProjectNumList.bidNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">项目</view>
						</view>
						<view>
							<u-count-to :start-val="0" :end-val="orgProjectNumList.waitingNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">待检测</view>
						</view>
						<view>
							<u-count-to :start-val="0" :end-val="orgProjectNumList.maintingNum" font-size="34"
								color="#fff"></u-count-to>
							<view class="ff-font-14 ff-margin-top-10">检测中</view>
						</view>
					</view>
				</view>
				<f-notice />
				<view class="ff-border-radius-5">
					<u-tabs bg-color="#fff" height="90" :list="staffTypeList" :show-zero="true" :current="typeCurrent"
						active-color="#3178FF" @change="staffTabberChange"></u-tabs>
					<view
						class="ff-bg-f5 ff-padding-left-15 ff-padding-right-15 ff-padding-top-12 ff-padding-bottom-12">
						<u-search v-model="params.keyword" input-align="center" @change="projectNameChange"
							bg-color="#FFFFFF" :height="72" :show-action="false" :clearabled="true"
							placeholder="请输入要搜索的项目名称"></u-search>
					</view>
				</view>
			</view>
			<!-- 列表数据 -->
			<view>
				<view v-if="detectionList.length > 0" class="maintenanceHome-content staff-top"
					:class="{ 'staff-top1': roleStatus == 2, 'staff-top2': roleStatus == 3 }">
					<view class="maintenanceHome-content-box ff-bg-fff ff-margin-bottom-12 ff-border-radius-10"
						v-for="(item, index) of detectionList" :key="index">
						<view class="ff-border-bottom ff-padding-15 ff-border-radius-10"
							@click.stop="detectionClick(item)">
							<view class="ff-font-16 ff-color-333 ff-font-weight-600 ff-ellipsis-1 ff-line-height-1-2">
								{{ item.testName }}
							</view>
							<view v-if="item.rescissionStatus == 1"
								class="rescindTips ff-padding-7 ff-border-radius-5 ff-color-fff ff-font-12 ff-line-height-1-5 ff-margin-top-9 ff-margin-bottom-5">
								请注意，社会单位已对本项目发起解约申请，点击进入项目详情查看与处理。如有异议，请尽快与单位联系。
							</view>
							<view class="ff-align-items-one ff-flex-wrap">
								<view class="ff-margin-right-10 ff-font-12">
									<view v-if="item.testStatus == 2" class="tips1">检测状态&nbsp;|&nbsp;已响应</view>
									<view v-if="item.testStatus == 3" class="tips1">检测状态&nbsp;|&nbsp;待指派</view>
									<view v-if="item.testStatus == 11" class="tips1">检测状态&nbsp;|&nbsp;待检测</view>
									<view v-if="item.testStatus == 4" class="tips1">检测状态&nbsp;|&nbsp;检测中</view>
									<view v-if="item.testStatus == 5" class="tips1">检测状态&nbsp;|&nbsp;待提交</view>
									<view v-if="item.testStatus == 6" class="tips1">检测状态&nbsp;|&nbsp;待审核</view>
									<view v-if="item.testStatus == 7" class="tips1">检测状态&nbsp;|&nbsp;待签发</view>
									<view v-if="item.testStatus == 8" class="tips1">检测状态&nbsp;|&nbsp;已驳回</view>
									<view v-if="item.testStatus == 9" class="tips1">检测状态&nbsp;|&nbsp;已完成</view>
									<view v-if="item.testStatus == 10" class="tips6">检测状态&nbsp;|&nbsp;已解约</view>
									<view v-if="item.testStatus == 12" class="tips6">检测状态&nbsp;|&nbsp;已作废</view>
									<view v-if="item.testStatus == 13" class="tips6">检测状态&nbsp;|&nbsp;已提交</view>
								</view>
								<view class="ff-font-12 ff-margin-right-10">
									<view v-if="item.testProjectType == 1" class="tips1 tipsType0">年度检测</view>
									<view v-if="item.testProjectType == 2" class="tips1 tipsType1">竣工检测</view>
									<view v-if="item.testProjectType == 3" class="tips1 tipsType2">监督抽查</view>
									<view v-if="item.testProjectType == 4" class="tips1 tipsType3">局部检测</view>
								</view>
								<view v-if="item.rescissionStatus == 1"
									class="tips4 ff-color-fff ff-font-12 ff-margin-right-10">解约确认中</view>
								<view class="tips5 ff-font-12"
									v-if="roleStatus == 2 && item.needWorkHoursFmt &&  (typeCurrent == 1 || typeCurrent == 0)">
									所需工时：{{ item.needWorkHoursFmt }}</view>
							</view>
							<view class="ff-margin--7" v-if="!item.modified"></view>
							<view class="ff-font-13 maintenanceHome-content-box-time" v-if="item.modified">
								更新于：{{ item.modified == null ? '/' : item.modified.substr(0, item.modified.length - 3) }}
							</view>
						</view>
						<view class="maintenanceHome-content-box-butList ff-padding-right-15 ff-justify-end">
							<view class=" ff-padding-top-15 ff-padding-bottom-15"
								v-if="roleStatus == 2 && typeCurrent == 1">
								<u-button type="primary" size="mini" @click.stop="assignClick(item, 1)">指派</u-button>
							</view>
							<view class="ff-padding-top-15 ff-padding-bottom-15"
								v-if="roleStatus == 2 && (item.testStatus == 4  || item.testStatus == 6  || item.testStatus == 7 || item.testStatus == 11)">
								<u-button type="primary" size="mini" @click.stop="assignClick(item, 2)">重新指派</u-button>
							</view>
							<view class="ff-padding-top-15 ff-padding-bottom-15"
								v-if="item.testStatus == 4 || item.testStatus == 11">
								<u-button @click.stop="godetectionClick(item)" type="primary" size="mini">去检测</u-button>
							</view>
							<view>
								<view class="ff-padding-top-15 ff-padding-bottom-15" v-if="item.testStatus == 5">
									<u-button type="primary" size="mini"
										@click.stop="editReportClick(item)">检测报告</u-button>
								</view>
							</view>
							<view class="ff-padding-top-15 ff-padding-bottom-15"
								v-if="item.testStatus == 6 || item.testStatus == 7 || item.testStatus == 8">
								<u-button @click.stop="reportClick(item)" type="primary" size="mini">检测报告</u-button>
							</view>
						</view>
					</view>
					<u-divider v-if="noData" border-color="#909399" height="120" margin-bottom="30" color="#909399"
						bg-color="#f5f5f5">没有更多了</u-divider>
				</view>
				<view v-else>
					<f-noData v-if="roleStatus == 2" :topStyle.sync="topStyleAdmin"></f-noData>
					<f-noData v-else :topStyle.sync="topStyleStaff"></f-noData>
				</view>
			</view>
		</view>
		<!-- 弹窗区 -->
		<u-toast ref="uToast" />
		<f-loading ref="loading" />
		<u-modal v-model="tipsModel" title="温馨提示" :content-style="{ 'line-height': '1.5' }" :content="tipsContent" />
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	export default {
		name: 'maintenanceHome',
		data() {
			return {
				tipsModel: false, // 提示弹窗
				tipsContent: '', // 提示弹窗内容
				// 检测项目状态(3.待指派 11.待检测 4.检测中 5.待提交 6.待审核 7.待签发 8.已驳回 9.已完成 10.已解约 )
				adminTypeList: [{
						name: '我的任务',
						count: 0
					},
					{
						name: '待指派',
						count: 0
					},
					{
						name: '待检测'
					},
					{
						name: '检测中'
					},
					{
						name: '待提交'
					},
					{
						name: '待审核'
					},
					{
						name: '待签发'
					},
					{
						name: '已驳回'
					},
				],
				staffTypeList: [{
						name: '我的任务',
						count: 0
					},
					{
						name: '待检测'
					},
					{
						name: '检测中'
					},
					{
						name: '待提交'
					},
					{
						name: '待审核'
					},
					{
						name: '待签发'
					},
					{
						name: '已驳回'
					},
				],
				typeCurrent: 0, // tabs切换index
				choiceActive: true, // tabs选择状态
				topStyleAdmin: '63%', // 暂无数据的css top状态(管理员)
				topStyleStaff: '41%', // 暂无数据的css top状态(员工)
				orgProjectNumList: {}, // 机构项目数量
				numListUrl: '', // 统计数量的url
				projectListUrl: '', // 任务列表的url
				detectionList: [], // 机构列表数据 // 机构列表数据请求的参数，检测项目状态( 4.检测中 3.待指派 11.待检测5.待提交 6.待审核 7.待签发 9.已完成8.已驳回  10.已解约 13.已提交 )
				detectionAssignedList: [], // 指派列表数据
				infoListdetection: [],
				total: 0,
				params: {
					isUserTask: 1, // 是否是我的任务 0：否 1：是
					current: 1,
					size: 10,
					statuses: [11, 4, 5, 6, 7, 8]
						.toString() // 4.检测中 3.待指派 11.待检测5.待提交 6.待审核 7.待签发 9.已完成 8.已驳回 10.已解约  12.已作废 13.已提交
				},
				noData: false // 没有更多了
			};
		},
		mounted() {
			this.getMechanismList(); // 获取机构的列表数据
			this.getMechanismProjectNumList(); // 获取机构所有项目的数量
		},
		computed: {
			// 用户角色状态
			...mapState({
				roleStatus: modules => modules.infoList.roleStatus,
				userInfo: modules => modules.infoList
					.userInfo
			}),
			tabberStyle() {
				return `top:${this.customBar}px;`;
			}
		},
		methods: {
			// onShow监听刷新
			showLoading() {
				this.params.current = 1;
				this.getMechanismList(); // 获取的机构项目数据列表
				this.getMechanismProjectNumList(); // 获取机构所有项目的数量
			},
			// 上拉加载
			pullLoading() {
				if (!this.noData) {
					this.params.current++;
					this.getMechanismList(); // 获取的数据列表
				}
			},
			// 下拉加载
			downLoading() {
				let that = this;
				that.params.current = 1;
				that.getMechanismList(); // 获取的数据列表
				that.getMechanismProjectNumList(); // 获取机构所有项目的数量
				setTimeout(() => {
					that.$refs.uToast.show({
						title: '刷新成功',
						type: 'success'
					});
					uni.stopPullDownRefresh(); // 停止刷新
				}, 100);
			},
			// 获取机构检测统计
			async getMechanismProjectNumList() {
				this.$refs.loading.openLoading('加载中···'); // 打开loading动画
				if (this.roleStatus == 2) {
					this.numListUrl = '/bsTestProjectInfo/org/manager/stat';
				} else if (this.roleStatus == 3) {
					this.numListUrl = '/bsTestProjectInfo/org/user/stat';
				}
				const data = await this.$http.get({
					url: this.numListUrl
				});
				// console.log('获取机构维保统计------', data);
				if (data.code == 200) {
					this.orgProjectNumList = data.data;
				}
				this.$refs.loading.closeLoading(); // 关闭loading动画
			},
			// tabber切换---管理员
			tabberChange(e) {
				this.typeCurrent = e;
				this.params.isUserTask = 1 // 是否是我的任务 0：否 1：是
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 0
				});
				// 检测项目状态(1.已发布 2.已响应 3.待指派 11.待检测 4.检测中 5.待提交 6.待审核 7.待签发 8.已驳回 9.已完成 10.已解约 12.已作废 13.已提交 )
				if (e == 0) {
					this.params.current = 1;
					this.params.statuses = [11, 4, 5, 6, 7, 8].toString()
					this.getMechanismList();
					return;
				}
				if (e == 1) {
					this.params.current = 1;
					this.params.statuses = 3;
					this.params.isUserTask = 0 // 是否是我的任务 0：否 1：是
					this.getMechanismList(); // 获取的待指派数据列表
					return;
				}
				if (e == 2) {
					this.params.current = 1;
					this.params.statuses = 11;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 3) {
					this.params.current = 1;
					this.params.statuses = 4;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 4) {
					this.params.current = 1;
					this.params.statuses = 5;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 5) {
					this.params.current = 1;
					this.params.statuses = 6;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 6) {
					this.params.current = 1;
					this.params.statuses = 7;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 7) {
					this.params.current = 1;
					this.params.statuses = 8;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
			},
			// tabber切换---员工
			staffTabberChange(e) {
				this.typeCurrent = e;
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 0
				});
				// 检测项目状态(// 4.检测中 11.待检测 5.待提交 6.待审核 7.待签发 9.已完成 8.已驳回 10.已解约 )
				if (e == 0) {
					this.params.current = 1;
					this.params.statuses =
						this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 1) {
					this.params.current = 1;
					this.params.statuses = 11;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 2) {
					this.params.current = 1;
					this.params.statuses = 4;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}

				if (e == 3) {
					this.params.current = 1;
					this.params.statuses = 5;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 4) {
					this.params.current = 1;
					this.params.statuses = 6;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 5) {
					this.params.current = 1;
					this.params.statuses = 7;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
				if (e == 6) {
					this.params.current = 1;
					this.params.statuses = 8;
					this.getMechanismList(); // 获取的机构项目数据列表
					return;
				}
			},
			// 搜索项目
			projectNameChange() {
				// console.log('当前搜索的值----', this.params)
				this.params.current = 1;
				this.getMechanismList(); // 获取机构项目的数据列表
			},
			// 获取机构的列表数据(管理员or员工)
			async getMechanismList() {
				this.$refs.loading.openLoading('加载中···'); // 打开loading动画
				const data = await this.$http.post({
					url: '/bsTestProjectInfo/org/project/home/page',
					data: this.params
				});
				// console.log('获取的机构列表数据------', data);
				if (data.code == 200) {
					this.$refs.loading.closeLoading(); // 关闭loading动画
					const infoList = data.data.records;
					if (infoList.length == 0 && this.params.current == 1) {
						// console.log('首次加载没数据');
						this.noData = false;
						this.detectionList = [];
					} else if (infoList.length < 3 && this.params.current == 1) {
						// console.log('首次加载有数据，但少于4条');
						this.noData = true;
						this.detectionList = infoList;
					} else if (infoList.length !== 0 && this.params.current == 1) {
						// console.log('首次加载有数据');
						this.noData = false;
						this.detectionList = infoList;
					} else if (infoList.length !== 0 && this.params.current > 1) {
						// console.log('上拉加载更多数据');
						this.noData = false;
						this.detectionList = this.detectionList.concat(infoList);
					} else if (infoList.length == 0 && this.params.current > 1) {
						// console.log('上拉加载没有更多数据了');
						this.noData = true;
					}
					// 管理员系列----
					// 我的任务
					if (this.typeCurrent == 0 && this.roleStatus == 2 && this.params.current == 1) {
						this.detectionAssignedList = []
						this.infoListdetection = [] // 存一个新的数据
						this.infoListdetection = this.detectionist
						this.total = data.data.total
						this.adminTypeList[0].count = this.total
						const isUserTask = 0;
						this.getdetectionAssignedList(isUserTask); // 获取的机构项目数据列表
						return
					}
					// 待指派
					if (this.typeCurrent == 1 && this.roleStatus == 2) {
						this.adminTypeList[1].count = data.data.total
						return
					}
					// 员工系列----
					// 我的任务
					if (this.typeCurrent == 0) {
						this.staffTypeList[0].count = data.data.total
						return
					}
				} else {
					this.$refs.loading.closeLoading(); // 关闭loading动画
					this.$refs.uToast.show({
						title: data.msg,
						type: 'error'
					});
				}
			},
			// 获取待指派列表数据---我的任务
			async getdetectionAssignedList(isUserTask) {
				const data = await this.$http.post({
					url: '/bsTestProjectInfo/org/project/home/page',
					data: {
						current: this.params.current,
						size: 20,
						isUserTask: isUserTask,
						statuses: 3
					}
				});
				// console.log('获取的待指派列表数据------', data);
				if (data.code == 200) {
					this.adminTypeList[1].count = data.data.total * 1
				}
			},
			// 循环比较执业人员是否有权限编辑报告书
			isCheckOperators(curId, recordId) {
				for (let i = 0; i < recordId.length; i++) {
					if (curId == recordId[i].userId) {
						return true;
					}
				}
				return false;
			},
			// 点击进入人员管理页面(调的维保的页面)
			personnelManagementClick() {
				this.$pageJump.navigateTo(
					'/pages/maintenance/mechanism/home/components/personnelManagement/personnelManagement');
			},
			// 点击项目列表进入详情
			detectionClick(item) {
				// console.log(item, 'testId')
				// 项目状态: 0.已发布 1.已响应 3.进行中 4.已结束 5.待审核
				this.$pageJump.navigateTo(
					'/pages/detection/mechanism/home/components/details/projectMaintenanceRecord?id=' +
					item.id);
			},
			// 指派 or 重新指派
			assignClick(item, type) {
				// console.log('指派 or 重新指派', item, type)
				// hasCorrected 是否已勘误:1.未勘误 2.已勘误
				// console.log('item.testStatus', item.testStatus)
				if (item.testStatus == 6) {
					// 重新指派审核人
					let ibs = {
						type: type,
						status: 4
					}
					let items = Object.assign(item, ibs);
					this.$pageJump.navigateTo('/pages/detection/mechanism/home/components/assign/Assign?infoList=' +
						encodeURIComponent(JSON.stringify(items)));
				} else if (item.testStatus == 7) {
					// 重新指派技术负责人（待签发）
					let ibs = {
						type: type,
						status: 3
					}
					let items = Object.assign(item, ibs);
					this.$pageJump.navigateTo('/pages/detection/mechanism/home/components/assign/Assign?infoList=' +
						encodeURIComponent(JSON.stringify(items)));
				} else {
					// 去指派 or 重新指派
					let items = Object.assign(item, {
						type: type
					});
					this.$pageJump.navigateTo('/pages/detection/mechanism/home/components/assign/Assign?infoList=' +
						encodeURIComponent(JSON.stringify(items)));
				}
			},
			// 点击进入响应记录列表页面
			goResponseRecord() {
				this.$pageJump.navigateTo('/pages/detection/mechanism/home/components/response/responseRecord');
			},
			// 去检测
			async godetectionClick(item) {
				//检测操作人员证书是否到期
				const data = await this.$http.post({
					url: '/bsTestProjectInfo/org/checkForCertificate?testId=' + item.id
				})
				// console.log('检查证书是否到期', data)
				if (data.code == 200) {
					if (data.data.certificateInValid && data.data.leader) {
						uni.showModal({
							title: '证书已到期',
							content: data.data.msg,
							confirmColor: '#3178FF',
							showCancel: false,
							success: function(res) {
								if (res.confirm) {
									// console.log('用户点击确定')
								}
							},
						})
					} else {
						// 跳转到去检测的页面
						this.$pageJump.navigateTo(
							'/pages/detection/mechanism/home/components/mechanismWork/mechanismWorking?testId=' +
							item.id);
					}
				} else {
					uni.showModal({
						title: '温馨提示',
						content: data.msg,
						confirmColor: '#3178FF',
						showCancel: false,
						success: function(res) {
							if (res.confirm) {
								// console.log('用户点击确定')
							}
						},
					})
				}
			},
			// 检测报告====待提交
			editReportClick(item) {
				this.$pageJump.navigateTo(
					'/pages/detection/mechanism/home/components/mechanismWork/components/mechanismResults?id=' +
					item.id);
			},
			// 检测报告书（查看以及操作）
			reportClick(item) {
				this.$pageJump.navigateTo('/pages/detection/mechanism/home/components/details/Report?id=' + item
					.id);
			}
		}
	};
</script>

<style lang="scss" scoped>
	@import './components/maintenanceHome.scss';

	.tips6 {
		background-color: #a8a7b5;
		color: #fff;
		padding: 12rpx 15rpx;
		border-radius: 8rpx;
		margin-top: 8.5rpx;
		margin-bottom: 8.5rpx;
	}

	.tipsType0 {
		background-color: #E9F6FF !important;
		color: #0090FF !important;
		border: 2rpx solid #0090FF !important;
	}

	.tipsType1 {
		background-color: #E4FFF1 !important;
		color: #34C67C !important;
		border: 2rpx solid #34C67C !important;
	}

	.tipsType2 {
		background-color: #FFF3F3 !important;
		color: #FF3636 !important;
		border: 2rpx solid #FF3636 !important;
	}

	.tipsType3 {
		background-color: #FFF2E2 !important;
		color: #FF8E00 !important;
		border: 2rpx solid #FF8E00 !important;
	}
</style>
<style>
	/* 1:隐藏滚动条，但是可以支持滚动的方法 */
	::-webkit-scrollbar {
		display: none;
	}
</style>